package pojo;

import sta.UserDao;

public class UserDaoImpl implements UserDao {
    @Override
    public int register(User user, User[] db) {
        for(int i=0;i<db.length;i++){
            String name=db[i].getName();
            if(name.equals(user.getName())){
            return 1;
            }
        }
        return 0;
    }
}
